package cate.common.table.d;

import cate.common.table.common.ParamSheet;

public class GDGem {
    public static final int LEAST_GEM_LEVEL = 1;

    /** 读取excel中配置的参数 */
    public static void initialize(ParamSheet param) {

    }

    public static int calcLevelNum(int targetLevel, int leastLevel){
        int num = 0;
        if (targetLevel > leastLevel) {
            int tmpLevel = leastLevel;
            while (targetLevel> tmpLevel) {
                num *= 3;
                if (num == 0) {
                    num = 3;
                }
                tmpLevel += 1;
            }
        } else if (targetLevel == leastLevel) {
            return 1;
        }
        return num;
    }
}
